<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>List of Staffs</title>
</head>
<body>
	<form method="post" action="DeleteMulti.action">
		<div class="content-box">
			<div class="box-body">
				<div class="box-header clear">
					<h2>Staff Management</h2>
				</div>

				<div class="box-wrap clear">

					<!-- DATA-TABLE JS PLUGIN -->
					<div id="data-table">

						<table class="style1 datatable">
							<thead>
								<tr>
									<th class="bSortable"><input type="checkbox"
										class="checkbox select-all" />
									</th>
									<th>Name</th>
									<th>Date Joined</th>
									<th>Date Left</th>
									<th>Account</th>
									<th>Status</th>
									<th>Manipulate</th>
								</tr>
							</thead>
							<tbody>
								<s:iterator value="staffs">
									<tr>
										<td><input name="staffs" type="checkbox" class="checkbox" value="<s:property value="staffId" />" /></td>
										<td><s:property value="staffName" /></td>
										<td><s:date name="dateJoined" format="dd/MM/yyyy" /></td>
										<td><s:date name="dateLeft" format="dd/MM/yyyy" /></td>
										<td>
											<a href="${contextPath}/accounts/Edit.action?id=<s:property value='account.accountId' />">Account</a>
										</td>
										<td>
											<s:set name="status" value="staffStatus" />
											<s:if test="#status">
												<img src="${adminPath}/public/images/ico_active_16.png" class="icon16 fl" title="inactive" alt="" />
											</s:if>
											<s:else>
												<img src="${adminPath}/public/images/ico_inactive_16.png" class="icon16 fl" title="inactive" alt="" />
											</s:else>
										</td>
										<td>
											<form></form>
											<form action='Edit.action' style="display: inline;">
												<input type='hidden' name=id value='<s:property value="staffId" />' />
												<input type='image' src="${adminPath}/public/images/ico_edit_16.png" />
											</form>
											<form action='Delete.action' style="display: inline;">
												<input type='hidden' name=id value='<s:property value="staffId" />' />
												<input type='image' src="${adminPath}/public/images/ico_delete_16.png" />
											</form>
										</td>
									</tr>
								</s:iterator>
							</tbody>
						</table>
						<div class="tab-footer clear fl">
							<div class="fl">
								<input type="submit" value="New" class="button fl-space" name="action:New" />
								<input type="submit" value="Delete All Checked" id="submit1"
									class="button fl-space" />
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</form>
</body>
</html>